/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author Cheng
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '/@/api/model/baseModel';

const { adminPath } = useGlobSetting();

export interface InFireAlarmInfo extends BasicModel<InFireAlarmInfo> {
  name?: string; // 火情预警名称
  enterpriseId?: string; // 企业ID
  enterpriseName?: string; // 企业名称
  buildId?: number; // 建筑id
  buildName?: string; // 建筑名称
  regionId?: number; // 区域id
  regionIname?: string; // 区域名称
  equipmentId?: string; // 设备Id
  equipmentName?: string; // 设备名称
  alarmTime?: string; // 预警时间
  alarmInfo?: string; // 预警信息
  feedback?: string; // 反馈内容（误报、火情、未反馈、故障）
  location?: string; // 详细地址
  createTime?: string; // 创建时间
  updateTime?: string; // 更新时间
  fireVideo?: string; // 火情视频
  inspectionVideo?: string; // 巡检视频
  taskId?: string; // 报警设备所在区域巡检任务ID
  fileUrl?: string; // 误报拍摄照片
  mark?: string; // 备注信息
}

export const inFireAlarmInfoList = (params?: InFireAlarmInfo | any) =>
  defHttp.get<InFireAlarmInfo>({ url: adminPath + '/management/inFireAlarmInfo/list', params });

export const inFireAlarmInfoListData = (params?: InFireAlarmInfo | any) =>
  defHttp.post<Page<InFireAlarmInfo>>({ url: adminPath + '/management/inFireAlarmInfo/listData', params });

export const inFireAlarmInfoForm = (params?: InFireAlarmInfo | any) =>
  defHttp.get<InFireAlarmInfo>({ url: adminPath + '/management/inFireAlarmInfo/form', params });

export const inFireAlarmInfoSave = (params?: any, data?: InFireAlarmInfo | any) =>
  defHttp.postJson<InFireAlarmInfo>({ url: adminPath + '/management/inFireAlarmInfo/save', params, data });

export const inFireAlarmInfoDelete = (params?: InFireAlarmInfo | any) =>
  defHttp.get<InFireAlarmInfo>({ url: adminPath + '/management/inFireAlarmInfo/delete', params });
